using System;
using Core.DataAccess.Interfaces;
using Microsoft.Practices.Unity;
//using Core.DataAccess.Implementations;

namespace Core.Relations
{
    public class DataProviderFactory
    {

        private IUnityContainer _unityContainer;

        public DataProviderFactory()
        {
            _unityContainer = new DependencyResolver().GetRegisteredTypes();
        }

        public IUserDataProvider GetUserDataProvider()
        {
            return _unityContainer.Resolve<IUserDataProvider>();
        }

        public ITagDataProvider GetTagDataProvider()
        {
            return _unityContainer.Resolve<ITagDataProvider>();
        }

        public  IQuestionListDataProvider GetQuestionListDataProvider()
        {
            return _unityContainer.Resolve<IQuestionListDataProvider>();
        }

        public IQuestionDataProvider GetQuestionDataProvider()
        {
            return _unityContainer.Resolve<IQuestionDataProvider>();
        }

        public IAnswerDataProvider GetAnswerDataProvider()
        {
            return _unityContainer.Resolve<IAnswerDataProvider>();
        }
        
    }
}
